public enum IdType extends Enum<IdType> implements Type
| Enum Constant and Description |
|---|
INTEGER
Integer type for Ids
|
LONG
Long type for Ids
|
STRING
String type for Ids
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getTypeClass()
Returns the Java type class that is associated with this IdType.
|
static IdType |
getTypeFor(Class<?> typeClass)
Returns the IdType based on a typeClass.
|
static IdType |
parseIdType(String input)
Parse IdType from a string value.
|
String |
toKey()
Returns the key of this type as string.
|
String |
toString()
Returns the key of this type as string.
|
static IdType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IdType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared.
|
public static final IdType INTEGER
public static final IdType LONG
public static final IdType STRING
public Class<?> getTypeClass()
getTypeClass in interface Typepublic static IdType getTypeFor(Class<?> typeClass)
typeClass - Use this typeClass to derive the IdTypepublic static IdType parseIdType(String input)
input - Value to use to parse an IdType from. You can use the output of toString() as input.public String toKey()
Typepublic static IdType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static IdType[] values()
for (IdType c : IdType.values())
System.out.println(c);
Copyright © 2015. All rights reserved.